package cn.com.lsjz.nursemanager.model.records;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;

import cn.com.lsjz.nursemanager.model.BaseModel;

@Entity
@Table(name="DOCS_REPORT_REC")
public class DocsReportRec extends BaseModel{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="REPORT_ID")
	private Integer reportId;
	
	@Column(name="PATIENT_ID")
	private String patientId;
	
	@Column(name="VISIT_ID")
	private String visitId;
	
	@DateTimeFormat(pattern="yyyy-MM-dd") 
	@Temporal(TemporalType.DATE)
	@Column(name="REPORT_DATE")
	private Date reportDate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm") 
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="TIME_POINT")
	private Date timePoint;
	
	@Column(name="THEME_CODE")
	private String themeCode;
	
	private String remark;
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm") 
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")
	private Date createTime;
	
	private String creator;
	
	@Column(name="CREATOR_UNIT")
	private String creatorUnit;
	
	@Column(name="ENABLE_VALUE")
	private String enableValue = "Y";
	
	@OneToMany(mappedBy="docsReportRec")
	private List<DocsReportDetail> details = new ArrayList<>();

	public Integer getReportId() {
		return reportId;
	}

	public void setReportId(Integer reportId) {
		this.reportId = reportId;
	}

	public String getPatientId() {
		return patientId;
	}

	public void setPatientId(String patientId) {
		this.patientId = patientId;
	}

	public String getVisitId() {
		return visitId;
	}

	public void setVisitId(String visitId) {
		this.visitId = visitId;
	}

	public Date getReportDate() {
		return reportDate;
	}

	public void setReportDate(Date reportDate) {
		this.reportDate = reportDate;
	}

	public Date getTimePoint() {
		return timePoint;
	}

	public void setTimePoint(Date timePoint) {
		this.timePoint = timePoint;
	}

	public String getThemeCode() {
		return themeCode;
	}

	public void setThemeCode(String themeCode) {
		this.themeCode = themeCode;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getCreatorUnit() {
		return creatorUnit;
	}

	public void setCreatorUnit(String creatorUnit) {
		this.creatorUnit = creatorUnit;
	}

	public String getEnableValue() {
		return enableValue;
	}

	public void setEnableValue(String enableValue) {
		this.enableValue = enableValue;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public List<DocsReportDetail> getDetails() {
		return details;
	}

	public void setDetails(List<DocsReportDetail> details) {
		this.details = details;
	}
	
}
